package com.xyy.saas.payment.adpater;

import com.xyy.saas.payment.cores.vo.QueryFuminRecordBo;
import com.xyy.saas.payment.cores.vo.QueryAccountBalanceDO;
import com.xyy.saas.payment.adpater.fumin.pojo.domain.SeparateAccountDO;
import com.xyy.saas.payment.cashier.core.vo.ChannelLoginVO;
import com.xyy.saas.payment.channel.login.core.bo.ChannelLoginResultBO;
import com.xyy.saas.payment.common.exception.PaymentException;
import com.xyy.saas.payment.cores.bo.*;
import com.xyy.saas.payment.cores.enums.ResultCodeEnum;
import com.xyy.saas.payment.cores.param.TransactionParam;
import com.xyy.saas.payment.dao.model.PrePayOrder;
import com.xyy.saas.payment.dao.model.RefundOrder;
import com.xyy.saas.payment.entrust.core.dto.EntrustPayDto;
import com.xyy.saas.payment.entrust.core.dto.EntrustPayInfoDto;
import com.xyy.saas.payment.merchant.core.dto.*;
import com.xyy.saas.payment.merchant.core.vo.PaymentAuthQueryVo;
import com.xyy.saas.payment.merchant.core.vo.PaymentAuthVo;
import com.xyy.saas.payment.merchant.core.vo.UserDto;
import com.xyy.saas.payment.payment.core.bo.RefundBO;
import com.xyy.saas.payment.payment.core.bo.WithdrawalBO;
import com.xyy.saas.payment.payment.core.dto.*;
import java.util.Map;

/**
 * @author chenshuyi
 * @date 2019/10/23 16:17
 */
public interface PaymentAdapter {
    /**
     * 微信、支付宝小程序登录
     */
    default ChannelLoginResultBO login(ChannelLoginVO channelLoginVO) throws PaymentException {
        throw new UnsupportedOperationException("login");
    }

    /**
     * 预支付
     */
    default PrepayBo prepay(PrepayDto prepayDto) throws PaymentException {
        throw new UnsupportedOperationException("prepay");
    }

    /**
     * 退款
     */
    default RefundBO refund(RefundDto refundDto) throws PaymentException {
        throw new UnsupportedOperationException("refund");
    }

    default RefundBO notifyRefund(RefundDto refundDto) {
        throw new UnsupportedOperationException("notifyRefund");
    }

    /**
     * 提现
     */
    default WithdrawalBO withdraw(WithdrawalDto withdrawalDto) throws PaymentException {
        throw new UnsupportedOperationException("withdraw");
    }

    /**
     * 提现
     */
    default WithdrawalBO withdrawAuth(WithdrawAuthDto withdrawAuthDto) throws PaymentException {
        throw new UnsupportedOperationException("withdrawAuth");
    }

    /**
     * 上传商户证件
     */
    default UserPicBo uploadPic(UserDto userDto) throws PaymentException {
        throw new UnsupportedOperationException("uploadPic");
    }

    /**
     * 创建企业用户
     */
    default SubAppBo createMerchant(UserDto userDto) throws PaymentException {
        throw new UnsupportedOperationException("createMerchant");
    }

    /**
     * 创建个人账户
     */
    default SubAppBo createPersonal(UserDto userDto) throws PaymentException {
        throw new UnsupportedOperationException("createPersonal");
    }

    /**
     * 修改企业信息
     */
    default AccountModifyBo modifyMerchant(MerchantAccountModifyDto param) throws PaymentException {
        throw new UnsupportedOperationException("modifyMerchant");
    }

    /**
     * 修改个人信息
     */
    default AccountModifyBo modifyPersonal(PersonalAccountModifyDto param) throws PaymentException {
        throw new UnsupportedOperationException("modifyPersonal");
    }

    /**
     * 查询账户余额
     */
    default UserBo queryAccount(QueryAccountDto queryAccountDto) throws PaymentException {
        throw new UnsupportedOperationException("queryAccount");
    }

    /**
     * 查询支付单状态
     */
    default QueryResultBo queryPayStatus(String tradeNo, PrePayOrder prePayOrder) throws PaymentException {
        throw new UnsupportedOperationException("queryPayStatus");
    }

    /**
     * 查询支付单状态
     */
    default QueryResultBo queryPayStatus(String tradeNo, PrePayOrder prePayOrder, String payMode) throws PaymentException{ return this.queryPayStatus(tradeNo, prePayOrder); }

    /**
     * 查询退款单状态
     */
    default QueryResultBo queryRefundStatus(RefundOrder refundOrder) throws PaymentException {
        return null;
    }

    /**
     * app支付
     */
    default AppPayBo appPay(AppPayDto appPayDto) throws PaymentException {
        throw new UnsupportedOperationException("appPay");
    }

    /**
     * miniPay支付
     */
    default MiniPayBo miniPay(MiniPayDto miniPayDto) throws PaymentException {
        throw new UnsupportedOperationException("miniPay");
    }

    default PayBo pay(PayDto payDto) throws PaymentException {
        return null;
    }

    /**
     * 订单关闭
     */
    default OrderClosedBo orderClosed(OrderClosedDto orderClosedDto) throws PaymentException {
        throw new UnsupportedOperationException("orderClosed");
    }

    /**
     * 发送验证码
     */
    default void sendActiveCodeByPhoneNum(ActiveCodeDto activeCodeDto) throws PaymentException {
        throw new UnsupportedOperationException("sendActiveCodeByPhoneNum");
    }

    /**
     * 进件
     */
    default CreateAllPayBo createAllPay(CreateAllPayDto createAllPayDto) throws PaymentException {
        throw new UnsupportedOperationException("createAllPay");
    };

    /**
     * 开通支付状态查询
     */
    default Map<String, Boolean> queryOpenPay(String accountId, String businessIdType) throws PaymentException {
        throw new UnsupportedOperationException("queryOpenPay");
    };

    /**
     * 签约
     */
    default EntrustBO entrustSign(EntrustPayInfoDto entrustPayInfoDto) throws PaymentException {
        throw new UnsupportedOperationException("entrustSign");
    }

    /**
     * 签约后代扣
     */
    default EntrustPayBO entrustPay(EntrustPayDto entrustPayDto) throws PaymentException {
        throw new UnsupportedOperationException("entrustPay");
    }

    /**
     * 冻结余额
     */
    default FrozenBo frozenBalance(FrozenDto frozenDto) throws PaymentException {
        throw new UnsupportedOperationException("frozenBalance");
    }

    /**
     * 解冻余额
     */
    default UnfrozenBo unfrozenBalance(UnfrozenDto unfrozenDto) throws PaymentException {
        throw new UnsupportedOperationException("unfrozenBalance");
    }

    /**
     * 检查交易状态
     */
    default QueryResultBo queryTransactionStatus(QueryTransactionStatusDto queryTransactionStatusDto) throws PaymentException {
        return null;
    }

    /**
     * 查询交易状态
     */
    default TransactionResultBO queryTransaction(TransactionParam param) throws PaymentException {
        throw new PaymentException(ResultCodeEnum.TRADE_NOT_EXIT_ERROR);
    }

    /**
     * 个人绑卡
     */
    default void personalCardBind(PersonalCardBindDto personalCardBindDto) throws PaymentException {
        throw new UnsupportedOperationException("personalCardBind");
    }

    /**
     * 企业绑卡
     */
    default String merchantCardBind(MerchantCardBindDto merchantCardBindDto) throws PaymentException {
        throw new UnsupportedOperationException("merchantCardBind");
    }

    /**
     * 绑卡打款结果查询
     */
    default PaymentAuthQueryVo paymentAuthQuery(PaymentAuthQueryDto paymentAuthQueryDto) throws PaymentException {
        throw new UnsupportedOperationException("paymentAuthQuery");
    }

    /**
     * 对公打款认证
     */
    default PaymentAuthVo paymentAuth(PaymentAuthDto paymentAuthDto) throws PaymentException {
        throw new UnsupportedOperationException("paymentAuth");
    }

    /**
     * 解绑卡
     */
    default void unBindCard(UnBindCardDto unBindCardDto) throws PaymentException {
        throw new UnsupportedOperationException("unBindCard");
    }

    /**
     * 账户转账
     */
    default SeparateAccountsBo separateAccountBetweenUser(SeparateAccountDO separateAccountDO) throws PaymentException {
        throw new UnsupportedOperationException("separateAccountBetweenUser");
    }

    /**
     * 查询账户流水
     */
    default QueryFuminRecordBo queryBalanceRecord(QueryAccountBalanceDO queryAccountBalanceDO) throws PaymentException {
        throw new UnsupportedOperationException("queryBalanceRecord");
    }

    /**
     * 查询订单金额信息
     */
    default OrderAmountInfoVo queryOrderAmountInfo(OrderAmountInfoDto param) throws PaymentException {
        throw new UnsupportedOperationException("queryOrderAmountInfo");
    }

    /**
     * 冻结充值
     */
    default RechargePayVo rechargePay(RechargePayDto param) throws PaymentException {
        throw new UnsupportedOperationException("rechargePay");
    }

    /**
     * 冻结充值撤销
     */
    default RechargeRefundVo rechargeRefund(RechargeRefundDto param) throws PaymentException {
        throw new UnsupportedOperationException("rechargeRefund");
    }

    /**
     * 非冻结充值
     */
    default RechargePayVo commonRechargePay(CommonRechargePayDto param) throws PaymentException {
        throw new UnsupportedOperationException("commonRechargePay");
    }

    /**
     * 非冻结充值撤销
     */
    default RechargeRefundVo commonRechargeRefund(CommonRechargeRefundDto param) throws PaymentException {
        throw new UnsupportedOperationException("commonRechargeRefund");
    }

    /**
     * 账户间转账
     */
    default AccountTransferVo accountTransfer(AccountTransferDto param) throws PaymentException {
        throw new UnsupportedOperationException("accountTransfer");
    }

    /**
     * 账户间转账退款
     */
    default AccountTransferRefundVo accountTransferRefund(AccountTransferRefundDto param) throws PaymentException {
        throw new UnsupportedOperationException("accountTransferRefund");
    }

    /**
     * 查询交易状态
     */
    default QueryTradeStatusVo queryTradeStatus(QueryTradeStatusDto param) throws PaymentException {
        throw new UnsupportedOperationException("queryTradeStatus");
    }

    /**
     * 分账
     */
    default SettleOrderVo settleOrder(SettleOrderDto param) throws PaymentException {
        throw new UnsupportedOperationException("settleOrder");
    }

    /**
     * 分账撤销
     */
    default SettleCancelVo settleCancel(SettleCancelDto param) throws PaymentException {
        throw new UnsupportedOperationException("settleCancel");
    }

    /**
     * 挂账登记
     */
    default RegisterOrderVo registerOrder(RegisterOrderDto param) throws PaymentException {
        throw new UnsupportedOperationException("registerOrder");
    }

    /**
     * 挂账登记撤销
     */
    default RegisterCancelVo registerCancel(RegisterCancelDto param) throws PaymentException {
        throw new UnsupportedOperationException("registerCancel");
    }

    /**
     * 查询渠道/银行清算结果
     */
    default QueryChannelClearVo queryChannelClear(QueryChannelClearDto param) throws PaymentException {
        throw new UnsupportedOperationException("queryChannelClear");
    }

    /**
     * 提现退票查询
     */
    default WithdrawRefundVo withdrawRefund(WithdrawRefundDto param) throws PaymentException {
        throw new UnsupportedOperationException("withdrawRefund");
    }

    /**
     * 查询对账文件信息
     */
    default QueryReconciliationFileVo downReconciliationFile(QueryReconciliationFileDto param) throws PaymentException {
        throw new UnsupportedOperationException("queryReconciliationFile");
    }

    /**
     * 查询交易凭证信息
     */
    default TradeCertificateVo queryTradeCertificate(QueryTradeCertificateDto param) throws PaymentException {
        throw new UnsupportedOperationException("queryTradeCertificate");
    }

    /**
     * 补单
     */
    default OrderSupplyVo orderSupply(OrderSupplyDto param) throws PaymentException {
        throw new UnsupportedOperationException("orderSupply");
    }

    /**
     * 查询三方账户ID
     */
    default QueryThirdUserIdVo queryThirdUserId(QueryThirdUserIdDto param) throws PaymentException {
        throw new UnsupportedOperationException("queryThirdUserId");
    }
}
